﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Roslyn.Compilers;
using Roslyn.Compilers.CSharp;

namespace rfactor
{
    class Program
    {
        static void Main(string[] args)
        {
            RenamerChecker myRenamerChecker = new RenamerChecker();

            string text = @"using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

#define asdf 123
 
namespace HelloWorld
{
    class Program
    {
        static void Main(string[] args)
        {
            var asdf;
            Greeter.greet();
            for(int i=0;i<10;i++)
            {
                #
            }
            var bsdf;
        }
    
        class Greeter
        {
            static public void greet()
            {
                string hullo = ""Hello"";
                Console.WriteLine(hullo);
            }
        }
    }
    
}";
            var tree = SyntaxTree.ParseCompilationUnit(text);
            myRenamerChecker.checkFor("Greeter",tree.Root);
            
            //System.Console.WriteLine(tree2.ToString());
        }

    }
}
